# Copyright 2024 The Kumo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

kmcmake_cc_library(
        NAMESPACE nebula
        NAME ipc_test_common
        SOURCES
        test_common.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        PLINKS
        nebula::nebula_testing_static
        ${KMCMAKE_DEPS_LINK}
)

set(JSON_TESTS
        feather_test
        json_simple_test
        message_internal_test
        read_write_test
        tensor_test
        )
foreach (case ${JSON_TESTS})
    kmcmake_cc_test(
            NAME ${case}
            MODULE ipc
            SOURCES ${case}.cc
            CXXOPTS
            ${KMCMAKE_CXX_OPTIONS}
            LINKS
            KTest::ktest
            KTest::ktest_main
            nebula::nebula_testing_static
            nebula::nebula_static
            nebula::ipc_test_common_static
            nebula::io_test_common_static
            ${KMCMAKE_DEPS_LINK}
    )
endforeach ()
